"""
使用面向对象思想进行测试点分析
username = ['user1','user2','user3']
password = ['11111','1','w123@']
email = ['user1@51testing.com','user2@sohu.com','user3@163.com']
"""


# 1.定义类：登录测试点
class test_login:

    # 2.定义属性
    def __init__(self, userName, passWord):
        self.userName = userName
        self.passWord = passWord

    # 3.定义方法
    def testcase(self):
        print(f"用户名：{self.userName}")
        print(f"密码：{self.passWord}")


# 定义类：注册测试点
class test_register(test_login):
    # 定义属性
    def __init__(self, userName, password, email):
        # 定义父类属性
        test_login.__init__(self, userName, password)
        # 定义自己属性
        self.email = email

    def testcase(self):
        test_login.testcase(self)

        print(f"email:{self.email}")


if __name__ == '__main__':
    # 实例化
    userName = ["user1", "user2"]
    password = ["111", "111222"]
    email = ["1@qq.com", "2@qq.com"]
    # for i in range(len(username)):
    #     logObj = test_login(username[i], password[i])
    #     logObj.testcase()
    #     print()
    # 调用子类
    # for i in range(len(username)):
    for i in range(len(userName)):
        regObj = test_register(userName[i], password[i], email[i])
        regObj.testcase()
